<div class="row">
  <div class="col-xs-12">
    <div class="box box-primary">
      <div class="box-header">
        <h3 class="box-title">Edit Data Agama</h3>
      </div><!-- /.box-header -->
      <?php echo form_open('master_agama/update', array('role' => 'form', 'id' => 'form'));
      if(!empty($list)){
      ?>
      <div class="box-body">				        
        <!-- text input -->
        <div class="form-group">
          <label>Agama</label>
          <input type="hidden" name="id" value="<?= $list['id_agama'];?>">
         	<input class="form-control input-sm" name="agama" value="<?= $list['agama']; ?>" type="text" placeholder="Nama agama">
        </div>
      </div>		                   
        <div class="box-footer">
          <button type="submit" class="btn btn-sm btn-primary btn-flat"><i class="fa fa-floppy-o"></i> Simpan</button>
        </div>
        <?php if (isset($_SERVER['HTTP_REFERER'])) {?>
          <input type="hidden" name="redirurl" value="<?php echo $_SERVER['HTTP_REFERER'];?>" />
          <?php }?>
			<?php
			}else{
			echo "Tidak ada data";	
			}
			echo form_close();
			?>
    </div><!-- /.box -->                            
  </div>
</div>

<script>
	$("#form").validate({
		rules: {
			agama: {
				required: true
			},
		}
	});
</script>